//
//  entity.cpp
//  template4
//
//  Created by Xiaochen Lian on 5/15/12.
//  Copyright (c) 2012 University of California, Los Angeles. All rights reserved.
//

#include "entity.h"

IEntity::IEntity() {
    m_visible = true;
    m_model_pos = 0.0;
    m_children.clear();
}

IEntity::~IEntity() {
    for (int i = 0; i < m_children.size(); ++i)
        delete m_children[i];
    m_children.clear();
}

inline bool IEntity::is_visible() { return m_visible; }

inline void IEntity::set_visible(bool visible) { m_visible = visible; }

inline void IEntity::set_type(PART_TYPE type) { m_type = type; }

inline PART_TYPE IEntity::get_type() { return m_type; }

inline void IEntity::set_pos(const point4 &pos) 
{ 
    m_model_pos = pos; 
}

inline point4 IEntity::get_pos() { return m_model_pos; }
